# Contributor: xcko <xcko@airmail.cc>
# Maintainer: Celeste <cielesti@protonmail.com>
maintainer="Celeste <cielesti@protonmail.com>"
pkgname=mpop
pkgver=1.4.20
pkgrel=1
pkgdesc="Retrieve mail from POP3 mailboxes"
url="https://marlam.de/mpop/"
arch="all"
license="GPL-3.0-or-later"
makedepends="gettext-dev gnutls-dev libsecret-dev libidn2-dev"
subpackages="$pkgname-doc $pkgname-lang $pkgname-vim::noarch"
source="https://marlam.de/mpop/releases/mpop-$pkgver.tar.xz"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install

	install -Dvm644 scripts/vim/mpop.vim \
		-t "$pkgdir"/usr/share/vim/vimfiles/syntax/
}

vim() {
	pkgdesc="Vim syntax for $pkgname"

	amove usr/share/vim/vimfiles/syntax/mpop.vim
}

sha512sums="
6786b3b524b87451aa3d7d816bd7bc0dd2ca6e8a7b43b0ed8e959eb42649f933086a3c2018efb8162aedc2cc2d135806f8a64e9de0b437f188cefbb1488b28a9  mpop-1.4.20.tar.xz
"
